package com.digitalart.section.index
{
	import com.digitalart.commons.TextFormatter;
	import flash.text.GridFitType;
	import flash.text.AntiAliasType;
	import flash.text.TextFieldAutoSize;
	import flash.text.TextField;
	import flash.events.Event;
	import flash.display.Bitmap;
	import flash.display.Sprite;
	
	
	public class IndexView extends Sprite
	{
		public static const ON_INDEX_VIEW_READY : String = "onIndexViewComplet";
		
		public static const BACKGROUND_WIDTH : Number = 1024;
		public static const BACKGROUND_HEIGHT : Number = 224;
		public static const BACKGROUND_X : Number = 200;
		public static const BACKGROUND_Y : Number = 270;
		
		
		
		public static const UNDER_CONST_X : Number = 1030;
		public static const UNDER_CONST_Y : Number = 20;
		
	 
		
		 
		private var _background : Bitmap;
		
		
		private var _underConstructionCopy : TextField;
		              
		
		

		/**********************************Constructor*************************/
		
		public function IndexView() {
			
			underConstructionCopy = new TextField();
			 
			
			TextFormatter.setTextFormatNoEmbed(underConstructionCopy);                                    
		 
		}
		
		/**********************************************************************/
		
		
		/**********************************Methods*************************/
		
		
		public function init() : void {
			
			this.addChild(_background);
			this.addChild(underConstructionCopy);
			
			setPartsLocations();
			
			dispatchEvent(new Event(ON_INDEX_VIEW_READY));
		}
		
		private function setPartsLocations() : void {
			
		  
			 background.width=BACKGROUND_WIDTH;
			 background.height=BACKGROUND_HEIGHT;
			 background.x=BACKGROUND_X;
			 background.y=BACKGROUND_Y;
			 background.smoothing=true;
			 
			 
			 underConstructionCopy.x = UNDER_CONST_X;
			 underConstructionCopy.y = UNDER_CONST_Y;
			 
		}
		
		 
		
		/**********************************************************************/
		/**************************Getters & Setters***************************/
		
		public function get underConstructionCopy():TextField
		{
			return _underConstructionCopy;
		}
		
		public function set underConstructionCopy(value:TextField):void
		{
			_underConstructionCopy = value;
		}
		
		public function get background():Bitmap
		{
			return _background;
		}
		
		public function set background(value:Bitmap):void
		{
			_background = value;
		}

		 
	}
}